package com.koron.css2.baseConfig.impl;

import com.koron.css2.ServerInterface;
import com.koron.css2.baseConfig.mapper.BaseInvoiceCostMapper;
import com.koron.css2.baseConfig.vo.BaseInvoiceCostVO;
import com.koron.css2.serviceManage.bean.RequestBean;
import com.koron.css2.serviceManage.bean.UserInfoBean;
import com.koron.util.Constant;
import org.koron.ebs.mybatis.SessionFactory;
import org.swan.bean.MessageBean;

import java.util.List;

public class BaseInvoiceCostQuery implements ServerInterface {

	@Override
	public MessageBean<?> exec(SessionFactory factory, UserInfoBean userInfo, RequestBean req) {
		// TODO Auto-generated method stub
		BaseInvoiceCostMapper mapper = factory.getMapper(BaseInvoiceCostMapper.class);
		List<BaseInvoiceCostVO> list = mapper.select();
		
		@SuppressWarnings("rawtypes")
		MessageBean<List> info = MessageBean.create(Constant.MESSAGE_INT_SUCCESS, "success", List.class);
		info.setData(list);
		return info;
	}

}
